package com.ruyuan.eshop.buyer.domain.request;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.ruyuan.eshop.framework.domain.request.BaseRequest;
import io.swagger.annotations.ApiModel;
import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

/**
 * <p>
 *
 * </p>
 *
 * @author pwd
 * @version 1.0
 */
@ApiModel
@Data
public class AddCartRequest extends BaseRequest {

    @NotNull(message = "产品id不能为空")
    @JsonProperty("sku_id")
    private Long skuId;

    @NotNull(message = "购买数量不能为空") @Min(value = 1, message = "加入购物车数量必须大于0")
    private Integer num;

    @JsonProperty("activity_id")
    private Long activityId;

    @JsonProperty("promotion_type")
    private String promotionType;

}